/* 
 * Author: Pedro Faustino, software.pedrofaustino.com
 * 
 */

FBL.ns(function() { with (FBL) { 

// Constants
//-----------------------------------------------------------------------------

const Cc = Components.classes;
const Ci = Components.interfaces;
const prefs = Cc["@mozilla.org/preferences-service;1"].getService(Ci.nsIPrefBranch2);

// Model implementation for AdAnalytics update
//-----------------------------------------------------------------------------

Firebug.AdAnalyticsUpdate = extend(Firebug.Module,
{
	dispatchName: "adAnalyticsUpdate",
	
	initializeUI: function()
    {
        if (FBTrace.DBG_ADANALYTICSOPTIONS)
            FBTrace.sysout("AdAnalyticsUpdate.initializeUI; Shortcuts module initialization.");
    },

    // UI Commands
    update: function()
    {
        var args = {
            FBL: FBL,
            FBTrace: FBTrace
        };

        // Open options dialog. Pass FBL into the XUL window so,
        // common APIs can be used (e.g. localization).
        window.openDialog("chrome://adanalytics/content/AdAnalyticsUpdate.xul", "Update AdAnalytics Filters", 
            "chrome,centerscreen,dialog,modal,resizable=yes", args);
    }

});

// Registration
//-----------------------------------------------------------------------------

Firebug.registerModule(Firebug.AdAnalyticsUpdate);

}});
